package cn.objectspace.webssh.service;


import cn.objectspace.webssh.controller.RealTimeLogsWebSocket;

/**
 * @author xuejingbao
 * @create 2022-11-18 9:13
 */
public interface IRealTimeLogsService {

    /**
     * 初始化连接
     *
     * @param ws
     */
    void initConnection(RealTimeLogsWebSocket ws);

    /**
     * 执行ssh指令
     *
     * @param ws
     * @param command
     */
    void execute(RealTimeLogsWebSocket ws, String command);

    /**
     * ssh实时回应
     *
     * @param ws
     * @param messageByte
     */
    void executiveResponse(RealTimeLogsWebSocket ws, byte[] messageByte);

    /**
     * 断开连接
     *
     * @param ws
     */
    void closeConnection(RealTimeLogsWebSocket ws);

}
